<?php
/* 
 * ********* CVS HEADER ********* 
 * 
 * $RCSfile: admhtmlrepnew.php,v $ 
 * $Date: 2006/03/21 17:51:37 $ 
 * $Revision: 1.3 $ 
 * 
 * ********* CVS HEADER ********* 
 */
//On verifie les donnees
if(trim($nom)==''){
   header("Location: ?op=admhtmlnav&r=$argid");
   exit;
}
//on recupere le path du repertoire courant
$query="SELECT path FROM html_repertoire WhERE id=$argid";
$result=rportalrequete($query) or rportalerreur ("$query","?op=");
$repertoire=rportalligne($result);
$path=$repertoire['path'].$nom.'/';
//on cree le nouveau repertoire
$query="INSERT INTO html_repertoire (nom,path,id_parent,droit) VALUES ('$nom','$path','$argid','$droit')";
$result = rportalrequete($query) or rportalerreur ("$query","?op=");

$new_id = rportallastid($result);
header("Location: ?op=admhtmlnav&r=$argid");
exit;
?>